(report-emacs-bug-hook): Use replace-match only if search was successful.
authorRichard M. Stallman <rms@gnu.org>
Tue, 30 Apr 2002 17:11:30 +0000 (17:11 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 30 Apr 2002 17:11:30 +0000 (17:11 +0000)
lisp/mail/emacsbug.el

index 9b1d3cd45539d4adab85e268142ce24ba68da55b..e444fbfae3e928109bb736cdf0f69a35aa86c557 100644 (file)
@@ -242,9 +242,9 @@ and send the mail again using \\[mail-send-and-exit].")))
     (let ((p (point)))
       (if (re-search-forward (concat "^In " (emacs-version)) nil t)
          (delete-region p (match-beginning 0))))
-    (re-search-forward "Please describe.+\n.+precise symptoms.+bug:\n*"
-                       (point-max) t)
-    (replace-match "Symptoms:\n")))
+    (if (re-search-forward "Please describe.+\n.+precise symptoms.+bug:\n*"
+                          (point-max) t)
+       (replace-match "Symptoms:\n"))))
 
 (provide 'emacsbug)